]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
app-system: Remove get_tree
authorJasper St. Pierre <jstpierre@mecheye.net>
Sat, 20 Apr 2013 20:57:10 +0000 (16:57 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Sun, 3 Nov 2013 00:12:37 +0000 (20:12 -0400)
Make clients construct their own gmenu tree if they need it.

https://bugzilla.gnome.org/show_bug.cgi?id=698486

js/ui/appDisplay.js
src/shell-app-system.c
src/shell-app-system.h

index 845a7dba490da001af6b92096970117076fbe7e2..178458e620359944cd1725322eade33044fd8897 100644 (file)
@@ -696,8 +696,7 @@ const AppDisplay = new Lang.Class({
     Name: 'AppDisplay',
 
     _init: function() {
-        this._appSystem = Shell.AppSystem.get_default();
-        this._appSystem.connect('installed-changed', Lang.bind(this, function() {
+        Shell.AppSystem.get_default().connect('installed-changed', Lang.bind(this, function() {
             Main.queueDeferredWork(this._allAppsWorkId);
         }));
         Main.overview.connect('showing', Lang.bind(this, function() {
@@ -818,7 +817,8 @@ const AppDisplay = new Lang.Class({
 
         view.removeAll();
 
-        let tree = this._appSystem.get_tree();
+        let tree = new GMenu.Tree({ menu_basename: "applications.menu" });
+        tree.load_sync();
         let root = tree.get_root_directory();
 
         let iter = root.iter();
index 9890bc57a8a43bd00766423355e3f620ad60615d..a9402e3eaf8ab27e661146daae64d385088f0bb1 100644 (file)
@@ -390,17 +390,6 @@ on_apps_tree_changed_cb (GMenuTree *tree,
   g_signal_emit (self, signals[INSTALLED_CHANGED], 0);
 }
 
-/**
- * shell_app_system_get_tree:
- *
- * Return Value: (transfer none): The #GMenuTree for apps
- */
-GMenuTree *
-shell_app_system_get_tree (ShellAppSystem *self)
-{
-  return self->priv->apps_tree;
-}
-
 /**
  * shell_app_system_get_default:
  *
index 4305878e76793bd33d6541342b111c85b13ddbc8..2fc294c8b98e9ee59672203812600b05b2937468 100644 (file)
@@ -39,8 +39,6 @@ struct _ShellAppSystemClass
 GType           shell_app_system_get_type    (void) G_GNUC_CONST;
 ShellAppSystem *shell_app_system_get_default (void);
 
-GMenuTree      *shell_app_system_get_tree                     (ShellAppSystem *system);
-
 ShellApp       *shell_app_system_lookup_app                   (ShellAppSystem  *system,
                                                                const char      *id);
 ShellApp       *shell_app_system_lookup_app_for_path          (ShellAppSystem  *system,